package com.haima.sage.bigdata.api.entity.api.data.cases;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.haima.sage.bigdata.api.frame.condition.ConditionGroup;
import com.haima.sage.bigdata.api.entity.api.data.config.ApiConfig;

public class Case {
    private ConditionGroup conditions;
    private ApiConfig config;

    public ConditionGroup getConditions() {
        return conditions;
    }

    public void setConditions(ConditionGroup conditions) {
        this.conditions = conditions;
    }

    public ApiConfig getConfig() {
        return config;
    }

    public void setConfig(ApiConfig config) {
        this.config = config;
    }

    @JsonIgnore
    public boolean isConditionEmpty() {
        if (conditions == null || conditions.getConditions() == null) {
            return true;
        }
        return conditions.getConditions().size() == 0;
    }
}
